(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["Input"] = factory();
	else
		root["grimm"] = root["grimm"] || {}, root["grimm"]["Input"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "./";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 239);
/******/ })
/************************************************************************/
/******/ ({

/***/ 155:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(81)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(exports, require('./formField'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, global.formField);
    global.inputBox = mod.exports;
  }
})(this, function (exports, _formField) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.inputBoxMixin = undefined;
  var inputBoxMixin = exports.inputBoxMixin = {
    mixins: [_formField.formFieldMixin],
    props: {
      placeholder: String,
      value: [String, Number],
      readonly: [Boolean, String, Number],
      type: {
        type: String,
        default: 'text'
      },
      icon: {
        type: String,
        default: ''
      },
      onEmpty: {
        type: Function,
        default: function _default(_) {
          return _;
        }
      }
    },
    computed: {
      _element: function _element() {
        return this.element;
      },
      _class: function _class() {
        return this.className;
      }
    },
    methods: {
      _onInnerInput: function _onInnerInput(evt) {
        var _this = this;

        var target = evt.target;

        this._onBaseIntercept(function (onChangeAfter) {
          _this.$emit('input', target.value);
          onChangeAfter(target.value, evt);
        }, target.value, function () {
          _this.$refs.inputRef.value = _this.value;
        });
      }
    },
    render: function render(h) {
      var _this2 = this;

      var value = this.value,
          type = this.type,
          placeholder = this.placeholder,
          disabled = this.disabled,
          readonly = this.readonly,
          _onInnerInput = this._onInnerInput,
          _class = this._class,
          _display = this._display,
          icon = this.icon;

      var children = [h(this._element, {
        domProps: { value: value, type: type, placeholder: placeholder, readonly: readonly, disabled: disabled },
        on: { input: _onInnerInput },
        ref: 'inputRef'
      })];
      if (this._element === 'input' && icon === 'empty' && value) {
        children.push(h('span', {
          'class': 'iconfont error-full',
          on: {
            click: function click() {
              _this2.$emit('input', '');
              try {
                _this2.onEmpty();
              } finally {
                console.log('error');
              }
            }
          }
        }));
      }
      return h('div', {
        'class': '' + _class + _display
      }, children);
    }
  };
});

/***/ }),

/***/ 239:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(240), __webpack_require__(241)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(module, exports, require('../../components/Input'), require('../../components/Textarea'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod, mod.exports, global.Input, global.Textarea);
    global.index = mod.exports;
  }
})(this, function (module, exports, _Input, _Textarea) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var _Input2 = _interopRequireDefault(_Input);

  var _Textarea2 = _interopRequireDefault(_Textarea);

  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      default: obj
    };
  }

  _Input2.default.install = function (Vue) {
    Vue.component(_Textarea2.default.name, _Textarea2.default);
    Vue.component(_Input2.default.name, _Input2.default);
  };
  _Input2.default.Textarea = _Textarea2.default;
  exports.default = _Input2.default;
  module.exports = exports['default'];
});

/***/ }),

/***/ 240:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(155)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(module, exports, require('../../common/mixins/inputBox'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod, mod.exports, global.inputBox);
    global.index = mod.exports;
  }
})(this, function (module, exports, _inputBox) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var name = 'grimm-input';
  exports.default = {
    name: name,
    mixins: [_inputBox.inputBoxMixin],
    props: {
      className: {
        default: name
      }
    },
    computed: {
      element: function element() {
        return 'input';
      }
    }
  };
  module.exports = exports['default'];
});

/***/ }),

/***/ 241:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(155)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(module, exports, require('../../common/mixins/inputBox'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod, mod.exports, global.inputBox);
    global.index = mod.exports;
  }
})(this, function (module, exports, _inputBox) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var name = 'grimm-textarea';
  exports.default = {
    name: name,
    mixins: [_inputBox.inputBoxMixin],
    props: {
      className: {
        default: name
      }
    },
    computed: {
      element: function element() {
        return 'textarea';
      }
    }
  };
  module.exports = exports['default'];
});

/***/ }),

/***/ 81:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(exports);
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports);
    global.formField = mod.exports;
  }
})(this, function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  var formFieldMixin = exports.formFieldMixin = {
    props: {
      className: {
        type: String,
        default: ''
      },

      disabled: {
        type: [Boolean, String, Number],
        default: false
      },

      display: {
        type: String,
        default: 'inline'
      },

      onChangeBefore: {
        type: Function,
        default: function _default() {
          return true;
        }
      },

      onChangeAfter: {
        type: Function,
        default: function _default(checkedVals, checkedOptions) {
          return { checkedVals: checkedVals, checkedOptions: checkedOptions };
        }
      },

      strict: {
        type: Boolean,
        default: false
      }
    },
    computed: {
      _display: function _display() {
        return this.display === 'inline' ? '' : '-block';
      },
      _class: function _class() {
        return this.className;
      }
    },
    methods: {
      _onBaseIntercept: function _onBaseIntercept(callback, val) {
        var _this = this;

        var reject = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (_) {
          return _;
        };

        if (!this.disabled) {
          var result = this.onChangeBefore(val);
          if (result) {
            if (result.then) {
              result.then(function (res) {
                return res && callback(_this.onChangeAfter);
              });
            } else {
              callback(this.onChangeAfter);
            }
          } else {
            reject();
          }
        }
      }
    }
  };
});

/***/ })

/******/ });
});